<?php

/**
 * Taxi form base class.
 *
 * @method Taxi getObject() Returns the current form's model object
 *
 * @package    KrazyTaxi
 * @subpackage form
 * @author     Your name here
 */
abstract class BaseTaxiForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'PATENTETAXI'      => new sfWidgetFormInputHidden(),
      'IDMODELOTAXI'     => new sfWidgetFormPropelChoice(array('model' => 'Modelotaxi', 'add_empty' => true)),
      'IDUSUARIO'        => new sfWidgetFormPropelChoice(array('model' => 'sfGuardUserProfile', 'add_empty' => true)),
      'TIPOPATENTETAXI'  => new sfWidgetFormInputText(),
      'FECHAINGRESOTAXI' => new sfWidgetFormDate(),
    ));

    $this->setValidators(array(
      'PATENTETAXI'      => new sfValidatorChoice(array('choices' => array($this->getObject()->getPatentetaxi()), 'empty_value' => $this->getObject()->getPatentetaxi(), 'required' => false)),
      'IDMODELOTAXI'     => new sfValidatorPropelChoice(array('model' => 'Modelotaxi', 'column' => 'IDMODELOTAXI', 'required' => false)),
      'IDUSUARIO'        => new sfValidatorPropelChoice(array('model' => 'sfGuardUserProfile', 'column' => 'IDUSUARIO', 'required' => false)),
      'TIPOPATENTETAXI'  => new sfValidatorString(array('max_length' => 10)),
      'FECHAINGRESOTAXI' => new sfValidatorDate(),
    ));

    $this->widgetSchema->setNameFormat('taxi[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Taxi';
  }


}
